package com.gitee.hljdrl.dialog.basis;

import android.app.Dialog;
import android.content.Context;
import android.view.View;

import androidx.annotation.LayoutRes;
import androidx.annotation.StringRes;
import androidx.annotation.StyleRes;

public interface ViewPartVisitor {

    void onViewVisit(Dialog dialog, View view);

    default  void onViewVisit(DialogEvent dialog, View view){

    }

    ViewPartVisitor setOnVisitedListener(OnVisitedListener visitedListener);

    default void onShow() {
    }

    default boolean onDismiss(Dialog dialog) {
        return false;
    }

    void setTitle(String title);

    void setTitle(CharSequence title);

    void setTitle(@StringRes int titleId);

    void setContent( @StringRes int content);

    void setContent(String content);

    void setContent(CharSequence content);

    void setLeftText(String label);

    void setLeftText(@StringRes int label);

    void setRightText(String label);

    void setRightText( @StringRes int label);

    void setContentGravity(int gravity);

    void setOnEventListener(OnEventListener onEventListener);

    void setTitleTextAppearance(@StyleRes int style);

    void setAutoLink(int autoLink);

    default @LayoutRes int getLayout() {
        return 0;
    }

    void setLayout(@LayoutRes int layout);

    void setGravity(int gravity);

    int getGravity();

    void setDialogTheme(@StyleRes  int theme);

    @StyleRes int getDialogTheme();

    ViewPartVisitor setMinimumTime(long time);

    long getMinimumTime();

    Dialog apply();

    Dialog apply(int theme);

    Dialog show();

    Dialog show(int theme);

}
